<%
Sub InitializeFID()

	If Not IsObject(Session("FIDList")) Then

		Set Session("FIDList")=Server.CreateObject("Scripting.Dictionary")

		Session("FID")=0

	End If
	
End Sub

Function GenerateFID()

	InitializeFID

	Session("FID") = Session("FID") + 1

	GenerateFID = Session("FID")

End Function

Sub RegisterFID()

	Dim strFID

	InitializeFID

	strFID = Request.Form("FID")
	Session("FIDlist").Add strFID, now()

	'提交成功时间
	Session("Last_Submit_Time") = Now()
End Sub

Function CheckFID()

	Dim strFID

	InitializeFID

	strFID   = Request.Form("FID")
	
	If Session("FIDlist").Exists(strFID)=True Then 
		CheckFID = True 
	Else
		'限制30秒内不能重复提交
		If IsDate(Session("Last_Submit_Time")) Then 
			If DateDiff("s",Session("Last_Submit_Time"),Now)<=30 Then 
				CheckFID = True 
			Else
				CheckFID = False
			End If
		Else
			CheckFID = False 
		End If
	End If

End Function

Sub RegisterFID_Width_File(strFID)


	InitializeFID

	Session("FIDlist").Add strFID, now()

	'提交成功时间
	Session("Last_Submit_Time") = Now()
End Sub


Function CheckFID_Width_File(strFID)


	InitializeFID

	
	If Session("FIDlist").Exists(strFID)=True Then 
		CheckFID_Width_File = True 
	Else
		'限制30秒内不能重复提交
		If IsDate(Session("Last_Submit_Time")) Then 
			If DateDiff("s",Session("Last_Submit_Time"),Now)<=30 Then 
				CheckFID_Width_File = True 
			Else
				CheckFID_Width_File = False
			End If
		Else
			CheckFID_Width_File = False 
		End If
	End If

End Function

%>